home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / cap / include / flip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.6 KB  |  60 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17.  
  18. #include <stdio.h>
  19. #include <gl.h>
  20. #include <device.h>
  21.  
  22. #define MODELDIR "/usr/demos/data/models/"
  23.  
  24. /* drawing data types */
  25.  
  26. enum DrawType
  27. {
  28.     POLYGONS,
  29.     LINES,
  30.     SUBSMOOTHLINES, 
  31.     NUM_DrawTypes
  32. } ;
  33.  
  34. #define FASTMAGIC    0x5423
  35.  
  36. typedef struct {
  37.     float *v0, *v1;
  38. } flipedge;
  39.  
  40. typedef struct {
  41.     int npoints;
  42.     int display ;    /* Draw me at all ? */
  43.     enum DrawType type ;    /* Polygons? Lines? What? */
  44.     int select ;    /* Am I selected? */
  45.     int material;    /* Material index */
  46.     int ablend;    /* Alpha-blend me? */
  47.     int swirl;    /* Go crazy with swirling? */
  48.     char *fname ;    /* Filename for menus */
  49.     float *data;    /* Raw polygon data */
  50.     float *swirldata;    /* Randomized data for swirling */
  51.     flipedge *edge;    /* Processed edges */
  52.     int nedges;
  53.     float er[4];    /* Cumulative rotation */
  54.     float espin[4];    /* Incremental rotation to spin */
  55.     float trans[3];    /* Translation */
  56. } flipobj;
  57.  
  58. flipobj *readflipobj();
  59.  
  60.